/*
 * @Author       : Hejh(3010733382@qq.com)
 * @Version      : V1.0
 * @Date         : 2024-01-29 18:13:21
 * @Description  : 后台管理页面路由
 */
import type { RouteRecordRaw } from 'vue-router'
const AdminRoutes: RouteRecordRaw[] = [
  {
    path: '/admin',
    name: 'admin',
    redirect: '/admin/index',
    component: () => import('@/views/Admin/index.vue'),
    children: [
      {
        path: 'index',
        name: 'user',
        meta: {
          icon: 'yonghu',
          title: '用户管理',
          auth: 'admin'
        },
        component: () => import('@/views/Admin/User/index.vue')
      },
      {
        path: 'activeCode',
        name: 'activeCode',
        meta: {
          icon: 'charulianjie',
          title: '激活码管理',
          auth: 'admin'
        },
        component: () => import('@/views/Admin/ActiveCode/index.vue')
      },
      {
        path: 'question',
        name: 'question',
        meta: {
          icon: 'icon_cloudnode_fill',
          title: '题目管理',
          auth: 'admin'
        },
        component: () => import('@/views/Admin/Question/index.vue')
      },
      {
        path: 'errorQuestion',
        name: 'errorQuestion',
        meta: {
          icon: 'icon_cloudnode_fill',
          title: '错题管理',
          auth: 'admin'
        },
        component: () => import('@/views/Admin/ErrorQuestion/index.vue')
      },
      {
        path: 'questionFav',
        name: 'questionFav',
        meta: {
          icon: 'icon_cloudnode_fill',
          title: '题目收藏',
          auth: 'admin'
        },
        component: () => import('@/views/Admin/QuestionFav/index.vue')
      },
      {
        path: 'examHistory',
        name: 'examHistory',
        meta: {
          icon: 'icon_cloudnode_fill',
          title: '考试记录',
          auth: 'admin'
        },
        component: () => import('@/views/Admin/ExamHistory/index.vue')
      },
      {
        path: 'userActiveExam',
        name: 'userActiveExam',
        meta: {
          icon: 'icon_cloudnode_fill',
          title: '用户激活考试',
          auth: 'admin'
        },
        component: () => import('@/views/Admin/UserActiveExam/index.vue')
      },
      {
        path: 'paper',
        name: 'paper',
        meta: {
          icon: 'copy',
          title: '试卷管理',
          auth: 'admin'
        },
        component: () => import('@/views/Admin/Paper/index.vue')
      },
      {
        path: 'exam',
        name: 'exam',
        meta: {
          icon: 'denglu',
          title: '科目管理',
          auth: 'admin'
        },
        component: () => import('@/views/Admin/Exam/index.vue')
      },
      {
        path: 'chapter',
        name: 'chapter',
        meta: {
          icon: 'jihuarenwu',
          title: '章节管理',
          auth: 'admin'
        },
        component: () => import('@/views/Admin/Chapter/index.vue')
      }
    ]
  }
]

export default AdminRoutes
